/**
 * Created by sunyan on 2017/7/19.
 */
import mainTemplate from './template.html'
import mainTemplate_2 from './template_2.html'
import $ from 'jquery'
module.exports = function(ele){
  let eleDom = document.querySelector(ele)
  if(!eleDom){
    console.warn("没有找到",ele, "请检查")
  }
  let userAgent = navigator.userAgent;
  // alert(userAgent)
  if( (userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") < 1) || userAgent.indexOf("MSIE 10.0")>0 ){
    $(eleDom).prepend(mainTemplate_2)
  }else{
    $(eleDom).prepend(mainTemplate)
    if(userAgent.indexOf("MSIE")>0 && userAgent.indexOf("MSIE 9.0")>0)
    {
      document.getElementById('lunar').setAttribute('class','lunar2')
    }
  }
};